<script type="text/javascript" src="__PUBLIC__/js/jquery-1.10.2.min.js"></script>
<script src="__PUBLIC__/js/global.js"></script>
<script src="__PUBLIC__/js/layer/layer.js"></script> 
<link rel="stylesheet" type="text/css" href="__STATIC__/css/common.min.css">
<link rel="stylesheet" type="text/css" href="__STATIC__/css/main.min.css">
<style>.fn-clear .words{ line-height:1.5}.m-top-nav a{color:#000;}</style>
<div class="fn-cms-top">
<adv pid="1" limit="1" item="v">
<div fnp="m-top-banner" style="background:{$v.bgcolor};" class="m-top-banner rel editable" moduleId="2010053" style="position:relative;min-height:35px;">
	 <div class="bar container">
	 	<a class="img-small" <if condition="$v['target'] eq 1">target="_blank"</if> href="{$v.ad_link}"> <img class="img100" src="{$v[ad_code]}"  title="{$v[title]}" style="{$v[style]}"/></a>   
	 </div>
	 <i data-role="close" class="icon icon-close"></i>
</div>
</adv>
<div class="m-top-bar editable" moduleId="1539923" style="position:relative;min-height:25px;">
  <div class="container">
    <ul class="fl">
      <li class="fl J_login_status dn nologin">
      	<a class="menu-item fl J_do_login J_chgurl" href="{:U('Home/user/login')}">
        <span>Hi，请登录</span> </a><a class="menu-item fl ht" href="{:U('Home/user/reg')}">免费注册</a>
      </li>
      <li class="fl J_login_status dn islogin"><a href="{:U('Home/user/index')}" class="userinfo" title="" target="_self"></a>
      	<a href="{:U('Home/user/logout')}" style="margin:0 10px;" title="退出" target="_self">退出</a></li>
      <li class="fl sep"></li>
      <!-- 
      <li class="fl select-city dropdown">
        <span class="menu-item">
        <span>送货至：</span>
        <a title="" alt="" href="" class="J_cur_place"></a><i class="dd"></i></span>
      </li>-->
    </ul>
    <ul class="fr bar-right">
      <li class="fl dropdown my-feiniu"><a class="menu-item" target="_blank" href="{:U('Home/Newjoin/index')}">
        <span>商家入驻</span><i class="dd"></i></a>
        <ul class="sub-panel">
          <li><a class="J_chgurl" target="_blank" href="{:U('/seller/Admin/login')}">商家登录</a></li>
        </ul>
      </li>
      <li class="fl dropdown my-feiniu"><a class="menu-item" target="_blank" href="{:U('Home/user/index')}">
        <span>我的商城</span><i class="dd"></i></a>
        <ul class="sub-panel">
          <li><a class="J_chgurl" target="_blank" href="{:U('/Home/User/order_list')}">我的订单</a></li>
          <li><a class="J_chgurl" target="_blank" href="{:U('/Home/User/account')}">我的积分</a></li>
          <li><a class="J_chgurl" target="_blank" href="{:U('/Home/User/coupon')}">我的优惠券</a></li>
          <li><a class="J_chgurl" target="_blank" href="{:U('/Home/User/goods_collect')}">我的收藏夹</a></li>
          <li><a class="J_chgurl" target="_blank" href="{:U('/Home/User/comment')}">我的评论</a></li>
        </ul>
      </li>
      <li class="fl sep"></li>       
      <li class="fl dropdown mobile-feiniu"><a class="menu-item" href=""><i class="fl ico"></i>
        <span class="fl">手机TPshop网</span>
        <i class="dd"></i></a>
        <div class="sub-panel m-lst">
          <p>扫一扫，下载TPshop客户端</p>
          <dl>
            <dt class="fl mr10"><a target="_blank" href=""><img height="80" width="80" src="__STATIC__/images/qrcode_vmall_app01.png"></a></dt>
            <dd class="fl mb10"><a target="_blank" href=""><i class="andr"></i> Andiord</a></dd>
            <dd class="fl"><a target="_blank" href=""><i class="iph"></i> iPhone</a></dd>
          </dl>
        </div>
      </li>
      <li class="fl sep"></li>
      <li class="fl"><a class="menu-item" href="{:U('Home/Article/detail',array('article_id'=>17))}" target="_blank">
        <span>帮助中心</span></a></li>
      <li class="fl sep"></li>
      <li class="fl about-us"><a class="txt fl" style="line-height:unset;" href="">关注我们：</a></li>
      <li class="fl dropdown weixin"><a href="" class="fl ico"></a>
        <div class="sub-panel wx-box">
          <span class="arrow-b">◆</span>
          <span class="arrow-a">◆</span>
          <p class="n"> 扫描二维码 <br>	关注TPshop网官方微信 </p>
          <img src="__STATIC__/images/qrcode_vmall_app01.png"></div>
      </li>
    </ul>
  </div>
</div>
<div class="m-top-sidebar m-sdb-sale J-sdb " moduleId="2026855" style="z-index:401;" fnp="m-top-sidebar">
  <div class="t-pic"><a href="" target="_blank" class="img-small"><img class="img100" src="__STATIC__/images/csmrrvbluacaoflbaacb1akwoks248.jpg"></a><a href="" target="_blank" class="img-big"><img class="img100" src="__STATIC__/images/csmrsfbluaoaejs7aacni7xvdgs548.jpg"></a></div>
  <div class="t-main"><a href="" class="bg-floor"></a>
    <div class="tb-tabs">
      <div class="tb-tabs-up">
      	<a href="{:U('Home/Cart/cart')}" class="i-cart" data-role="ico-cart"><i></i>
        <span class="text">购物车</span><span id ="miniCartRightQty" class="num">0</span></a>
        <a href="{:U('/Home/User/order_list')}" target="_blank" class="i-ico i-ico-order" data-role="ico-btn">
        <span>我的订单</span><i class="demo-icon">&#xe807;</i></a>
        <a href="{:U('/Home/User/coupon')}" target="_blank" class="i-ico i-ico-coupon" data-role="ico-btn">
        <span>我的优惠券</span><i class="demo-icon">&#xe80f;</i></a>
        <a href="{:U('/Home/User/goods_collect')}" target="_blank" class="i-ico i-ico-fav" data-role="ico-btn">
        <span>我的收藏</span><i class="demo-icon">&#xe808;</i></a>
        <a href="{:U('/Home/User/comment')}" target="_blank" class="i-ico i-ico-foot" data-role="ico-btn">
        <span>我的评论</span><i class="demo-icon">&#xe805;</i></a>
      </div>
      <div class="tb-tabs-down">
        <div class="rel" style="display: none;" id="cms_share">
          <div data-tag="share_1" class="bdsharebuttonbox"><a data-cmd="more" class="bds_more" href=""></a></div>
          <a class="i-ico i-ico-share" href="">
          <span>分享</span>
          <i></i></a></div>
        <a href="" target="_blank" class="i-ico i-ico-ur" data-role="ico-btn">
        <span>意见反馈</span>
        <i></i></a><a href="" class="i-ico i-ico-gotop" data-role="ico-gotop"><em></em>
        <span>返回顶部</span>
        <i></i></a></div>
      <div class="my-cart-shim"></div>
    </div>
    <div class="my-cart">
      <div class="mn-c-top" ><a href="">我的购物车</a><i data-role="cart-close-btn"></i></div>
      <div class="sub-panel u-fn-cart u-mn-cart">
        <div id="miniCartRight"></div>
        <div class="empty-c fn-hide">
          <span class="ma"><i class="c-i oh"></i>购物车中没有TPshop商品哟！</span>
        </div>
      </div>
    </div>
  </div>
</div>
<div class="m-top-search editable" moduleId="1539927" style="position:relative;min-height:35px;">
  <div class="container">
    <div class="logo fl">
    	<a href="/" target="_blank" class="item fl">
    	<img height="60" width="160" src="{$tpshop_config['shop_info_store_logo']}"></a>
    	<!-- <a href="" target="_blank" class="item fl"><img height="60" width="140" src="__STATIC__/images/csmrrvbluvoamtx8aaeoswlm7gg007.gif"></a>--
    	<a href="http://beauty.tp-shop.cn" target="_blank" class="item fl">
    		<img height="60" width="140" src="http://img14.fn-mart.com/group1/M00/DC/08/CsnBP1Y691GAZQRtAAAGc8GxEf8284.png">
    	</a>-->
    </div>
    <div fnp="m-top-search-form" class="m-top-search-form fl">
       <form name="sourch_form" id="sourch_form" method="post" action="{:U("/Home/Goods/search")}">
        <div data-role="form-inner" class="s-form"><i class="s-ico"></i>
          <input type="text" data-role="input-search" autocomplete="off" class="fl s-input" name="q" id="q" value="<?php echo I('q'); ?>" placeholder="搜索关键字"/>
          <a data-role="btn" href="javascript:void(0);" class="s-btn fl" onclick="if($.trim($('#q').val()) != '') $('#sourch_form').submit();">搜索</a>
        </div>
        <div class="s-hotword">           
        	<foreach name="tpshop_config.hot_keywords" item="wd" key="k">
        		<a href="{:U('Home/Goods/search',array('q'=>$wd))}" <if condition="$wd eq I('q')">class="ht"</if>>{$wd}</a>
        	</foreach>
        </div>
        <ul data-role="tip-list" class="s-tip-list">
        </ul>
      </form>
    </div>
    <div class="my-cart fr" id="hd-my-cart">
      <p class="c-n fl">我的购物车</p>
      <p class="c-num fl quantity">(<span class="count cart_quantity" id="cart_quantity"></span>) <i class="i-c oh"></i></p>
      <div id="show_minicart" class="sub-panel u-fn-cart u-mn-cart">
        <div id="minicart" class="minicartContent">
          <div class="empty-c fn-hide">
            <span class="ma"><i class="c-i oh"></i>购物车中没有TPshop商品哟！</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<div fnp="m-top-search-fixed" class="m-top-search-fixed"><i class="s-bg"></i>
  <div class="fix-bar">
    <div class="container">
      <div class="u-g-logo fl"><a target="_blank" class="fl logo" href=""><img height="40" width="100" src="__STATIC__/images/logo3.png"></a></div>
      <div fnp="m-top-search-form" class="m-top-search-form fl">
        <form data-role="form" action="http://search.tp-shop.cn">
          <div data-role="form-inner" class="s-form"><i class="s-ico"></i>
            <input type="text" data-role="input-search" autocomplete="off" class="fl s-input" name="q">
            <input type="hidden" data-role="input-c" name="cpseq" disabled="disabled">
            <a data-role="btn" href="" class="s-btn fl">搜索</a></div>
          <ul data-role="tip-list" class="s-tip-list">
          </ul>
        </form>
      </div>
    </div>
  </div>
</div>

<div class="m-top-nav editable" moduleId="1539926" style="position:relative;min-height:35px;">
  <div class="main-container new-year">
    <div class="main-title-wrap">
    	<a href="javascript:" target="_blank" class="main-title">
      		<span class="ico"><i class="il il-lt"></i><i class="il il-lc"></i><i class="il il-lb"></i>
      		<i class="il il-rt"></i><i class="il il-rc"></i><i class="il il-rb"></i></span>
      		商城商品分类
      	</a>
      <div class="main-slider" style ="display:none;position: absolute;top: 40px;">
          <div fnp="nav-list" class="nav-list eidtModule" moduleId="nav">
            <ul class="nav-list-warpper">
              <tpshop sql="select * from `__PREFIX__goods_category` where is_show = 1 and `level` = 1  limit 15" key="k" item='v'>
	              <li data-role="nav-item" class="nav-item" index="{$v.id}">
	                <span class="nav-menu-item"><i class="iconfont icon"></i>
	                <span class="title"><a href="{:U('Home/Goods/goodsList',array('id'=>$v[id]))}" target="_blank">{$v.name}</a></span>
	                </span>
	              </li>
              </tpshop>
            </ul>
           <foreach name="goods_category_tree" item="vo" key="k">
	        <div data-role="menu-sub" class="menu-sub" index ="{$k}" style="height:440px">
		        <div class="sub-columns">
		        	<foreach name="vo.tmenu" item="v2" key="k2">
		        	<if condition="$k2%3 eq 0">
		                <div class="fn-clear column-item">
		                  <div class="tlt">
		                    <span class="name"><a href="{:U('Home/Goods/goodsList',array('id'=>$v2[id]))}" target="_blank">{$v2.name}</a></span>
		                  </div>
		                  <div class="words">
		                  	<foreach name="v2.sub_menu" item="v3">
		                  		<a href="{:U('Home/Goods/goodsList',array('id'=>$v3[id]))}" <if condition="$v3[is_hot] eq 1">class="lh"</if> target="_blank">{$v3.name}</a>
		                  	</foreach>
		                  </div>
		                </div>
	                </if>
	                </foreach>
	            </div>
	            
	            <div class="sub-columns">
		        	<foreach name="vo.tmenu" item="v2" key="k2">
		        	<if condition="$k2%3 eq 1">
		                <div class="fn-clear column-item">
		                  <div class="tlt">
		                    <span class="name"><a href="{:U('Home/Goods/goodsList',array('id'=>$v2[id]))}" target="_blank">{$v2.name}</a></span>
		                  </div>
		                 <div class="words">
		                  	<foreach name="v2.sub_menu" item="v3">
		                  		<a href="{:U('Home/Goods/goodsList',array('id'=>$v3[id]))}" <if condition="$v3[is_hot] eq 1">class="lh"</if> target="_blank">{$v3.name}</a>
		                  	</foreach>
		                  </div>
		                </div>
	                </if>
	                </foreach>
	            </div>
		        <div class="sub-columns">
		        	<foreach name="vo.tmenu" item="v2" key="k2">
		        	<if condition="$k2%3 eq 2">
		                <div class="fn-clear column-item">
		                  <div class="tlt">
		                    <span class="name"><a href="{:U('Home/Goods/goodsList',array('id'=>$v2[id]))}" target="_blank">{$v2.name}</a></span>
		                  </div>
		                  <div class="words">
		                  	<foreach name="v2.sub_menu" item="v3">
		                  		<a href="{:U('Home/Goods/goodsList',array('id'=>$v3[id]))}" <if condition="$v3[is_hot] eq 1">class="lh"</if> target="_blank">{$v3.name}</a>
		                  	</foreach>
		                  </div>
		                </div>
	                </if>
	                </foreach>
	            </div>
	            <div class="right-wrap">
                <ul class="li-item">
                  <volist name="vo.brand" id="br" mod="2">
	                  <li class="item" <eq name="mod" value="1">even</eq>>
	                  	<a href="{:U('Goods/goodsList',array('brand_id'=>$br[id]))}" target="_blank">
	                  	<img class="nav-prod" src="__STATIC__/images/loading.gif" alt="" data-images="{$br.logo}"></a>
	                  </li>
                  </volist>
               	  <li class="item"><a href="" target="_blank"><img class="nav-prod" src="__STATIC__/images/loading.gif" alt="" data-images="http://img18.fn-mart.com/pic/ceb9133a1f582292acba/BzHznn5T_2tlKguMj2/7imGea0GgaXxzG/CsmRslaV66qAPaFEAAANRKhmwYQ120.png"></a></li>
                  <li class="item even"><a href="" target="_blank"><img class="nav-prod" src="__STATIC__/images/loading.gif" alt="" data-images="http://img16.fn-mart.com/pic/d0fa133a2028dd2c1cad/Bnq2zz72_2fMKdudf2/1YoaSyWGPykRMy/CsmRsFam0vmAfovCAAB1Wrm172E209.jpg"></a></li>
                </ul>
                <adv pid="80+$k" limit="1" item="vv">
	          	   <a href="{$vv.ad_link}" target="_blank">
	          	   	  <img title="{$vv[title]}" style="{$vv[style]}" data-images="{$vv[ad_code]}" class="right-img nav-prod" src="__STATIC__/images/loading.gif">
	          	   </a>
	          	</adv> 
                </div>
	        </div>
          </foreach>
       </div>
      </div>
    </div>
    <ul class="main-nav">
      <li class="nav-item"><a class="menu-item <if condition=" CONTROLLER_NAME eq 'Index' ">menu-item-active"</if> target="_blank" href="/" style="overflow: visible;">首页 </a></li>
      <tpshop sql="SELECT * FROM `__PREFIX__navigation` where is_show = 1 ORDER BY `sort` DESC" key="k" item='v'>
       <li class="nav-item"><a  style="overflow: visible;"   href="{$v[url]}" 
       		<?php  if($_SERVER['REQUEST_URI']==str_replace('&amp;','&',$v[url])){ echo "class='menu-item menu-item-active'";}
       		else{ echo "class='menu-item'"; } ?>> {$v[name]} </a></li>
      </tpshop>
      <li class="nav-item"><a class="menu-item " href="javascript:void();" style="overflow: visible;">TPshop商城<i class="e-hot"></i></a></li>
    </ul>  
   </div>
</div>
<div>
  <div class="J_side_nav_trigger"></div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
	$('.main-title').hover(function(){
	 	$('.main-slider').show();
	}, function(){
	 	$('.main-slider').hide();
	});
	
	$('.nav-list-warpper').hover(function(){
	 	$('.main-slider').show();
	}, function(){
	 	$('.main-slider').hide();
	});
	     
	get_cart_num();
	var uname= getCookie('uname');
	if(uname == ''){
		$('.islogin').remove();
		$('.nologin').show();
	}else{
		$('.nologin').remove();
		$('.islogin').show();
		$('.userinfo').html(decodeURIComponent(uname));
	}
});


function get_cart_num(){
  var cart_cn = getCookie('cn');
  if(cart_cn == ''){
	$.ajax({
		type : "GET",
		url:"/index.php?m=Home&c=Cart&a=header_cart_list",//+tab,
		success: function(data){								 
			cart_cn = getCookie('cn');						
		}
	});	
  }
  $('#cart_quantity').html(cart_cn);
  $('#miniCartRightQty').html(cart_cn);
}
</script>